using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class People : MonoBehaviour, IInteractable
{
    private bool startFollow;
    private GameObject player;

    private void Update()
    {
        if (startFollow)
            transform.position = new Vector3(player.transform.position.x - 1, player.transform.position.y - 1, 0);
    }

    public void InteractAction()
    {
        tag = "Untagged";
        startFollow = true;
        player = GameObject.FindGameObjectWithTag("Player");
        EventHandler.CallCarryPeople(gameObject);
    }

    public void EndINteractACtion()
    {
        throw new System.NotImplementedException();
    }
}
